package com.voiceqsologger.service;

import com.baomidou.mybatisplus.extension.toolkit.Db;
import com.voiceqsologger.config.AppFeatureProperties;
import com.voiceqsologger.entity.QsoLog;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * 通联日志服务：保存与查询
 */
@Service
@RequiredArgsConstructor
public class QsoLogService {

    private final AppFeatureProperties feature;

    public void save(QsoLog log) {
        if (!feature.isEnabled()) {
            return; // 关闭持久化时直接跳过
        }
        Db.save(log);
    }
}


